getaddrinfo-is-threadsafe
authorDebian OpenLDAP Maintainers <pkg-openldap-devel@lists.alioth.debian.org>
Fri, 11 Sep 2015 03:13:17 +0000 (03:13 +0000)
committerRyan Tandy <ryan@nardis.ca>
Fri, 11 Sep 2015 03:13:17 +0000 (03:13 +0000)
commit5e90b872147944438dc935d48dba988fce4f8aaa
tree4af7e33dc22cc918981d9b2bb2b2b79a33f4ee64
parent54e874317bfe430363c77a508ab6d2d78535e52a
getaddrinfo-is-threadsafe

OpenLDAP upstream conservatively assumes that certain resolver functions
(getaddrinfo, getnameinfo, res_query, dn_expand) are not re-entrant; but we
know that the glibc implementations of these functions are thread-safe, so
we should bypass the use of this mutex.  This fixes a locking problem when
an application uses libldap and libnss-ldap is also used for hosts
resolution.

Closes Debian bug #340601.

Not suitable for forwarding upstream; might be made suitable by adding a
configure-time check for glibc and disabling the mutex only on known
thread-safe implementations.

Gbp-Pq: Name getaddrinfo-is-threadsafe
libraries/libldap/os-ip.c
libraries/libldap/util-int.c